package com.qf.user.mapper;

import com.qf.user.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 管理员用户表 Mapper 接口
 * </p>
 *
 * @author XJJ
 * @since 2023-10-30
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    //散出用户
    @Delete("DELETE FROM\n" +
            "\tqf_user\n" +
            "\tLEFT JOIN\n" +
            "\tqf_user_role\n" +
            "\tON \n" +
            "\t\tqf_user.id = qf_user_role.user_id\n" +
            "WHERE\n" +
            "\tqf_user.id =  #{id}")
    int delete(Long id);

}
